﻿<%@ Page Title="" Language="C#" MasterPageFile="/Common/Master.master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentForm" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHtml" runat="Server">
    <div id="toolBar" style="display: none;">
        <div id="toolbarAdd" style="display: none;" data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Insert(obj,'ShopID='+$.getUrlParamer('ShopID'))">添加</div>
        <div id="toolbarEdit" style="display: none;" data-options="iconCls:'icon-table_edit',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Update(obj,'ShopID='+$.getUrlParamer('ShopID'))">修改</div>
        <div id="toolbarDelete" style="display: none;" data-options="iconCls:'icon-table_delete',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Delete(obj)">删除</div>
        <div data-options="iconCls:'icon-table_gear',plain:'true'" class="easyui-linkbutton" onclick="szqx();">设置角色</div>
        <div id="toolbarSearchtext"></div>
    </div>
    <div id="page"></div>
    <table id="dg1" style="display: none;">
        <thead>
            <tr>
                <th data-options="field: 'login_name',width: 150">登录名称</th>
                <th data-options="field: 'user_name',width: 150">用户名</th>
                <th data-options="field: 'PassWord',width: 150">密码</th>
                <th data-options="field: 'Address',width: 150">地址</th>
                <th data-options="field: 'ImgUrl',width: 150">头像</th>
                <th data-options="field: 'Gender',width: 150">性别</th>
                <th data-options="field: 'Mobile',width: 150">手机号</th>
                <th data-options="field: 'Remark',width: 150">备注</th>
                <th data-options="field: 'AddTime',width: 150,formatter:function(val,rec){ return $.DateFormat(val, 'yyyy-MM-dd HH:mm:ss'); }">创建时间</th>
                <th data-options="field: 'AddUserID',width: 150">创建人ID</th>
            </tr>
        </thead>
    </table>

    <script type="text/javascript">

        var obj;
        $(function () {
            obj = {
                id: "dg1",
                key: "ID",
                url: "Api/V1/System_UserInfo/GetPagesUserInfo",
                deleteUrl: "Api/V1/System_UserInfo/DeleteUserInfo",
                data: { ID: $.getUrlParamer("id") },

                //title: "用户表管理",
                dialogName: "用户表管理",
                dialogWidth: Cookies.get('DialogWidth') + "px",
                dialogHeight: Cookies.get('DialogHeight') + "px",
                editUrl: "/system/UserInfo/edit.aspx?OrgID=" + $.getUrlParamer('id'),
                detailsUrl: "/system/UserInfo/details.aspx",
                toolBar: '#toolBar',
                footer: '#page',
                callback: function () { $.fn.DataGrid.onRefresh(obj); }
            };
            $.fn.DataGrid.DataBind(obj);
        });

        function szqx() {
            var row = $('#dg1').datagrid('getSelected');
            if (row != null) {
                var _url = "/system/UserInfo/Jurisdiction.aspx?UserInfoID=" + row[obj.key] + "&OrgID=" + $.getUrlParamer('id');
                $.layerOpen({ title: "设置权限", width: Cookies.get('DialogWidth') + "px", height: Cookies.get('DialogHeight') + "px", url: _url, callback: function () { } });
            } else {
                $.messager.alert('提示信息', '您还没有选择任何记录！', 'info');
            }
        }
    </script>
</asp:Content>
